﻿{include file="public/header" /}
<title></title>
</head>

<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span> 意见反馈
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="page-container">
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr class="text-c">
				<th width="40">ID</th>
				<th>类型</th>
				<th>内容</th>
				<th width="130">oem_id</th>
				<th width="130">增加时间</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="data" id="vo" empty="这里没有数据"}
			<tr class="text-c">
				<td>{$vo.id}</td>
				<td>
					{switch name="$vo.id" }
					    {case value="1"}功能异常{/case}
					    {case value="2"}意见改进{/case}
					    {default /}其他问题
					{/switch}
				</td>
				<td>{$vo.content}</td>
				<td>{$vo.oem_id}</td>
				<td>{$vo.add_time}</td>
				<td class="td-manage">
					<a title="删除" href="javascript:;" onclick="complain_del(this,{$vo.id})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
				</td>
			</tr>
			{/volist}
			</tbody>
			</table>
		</div>
		{include file="public/footer" /}
		<script type="text/javascript">
			/*管理员-删除*/
			function complain_del(obj, id) {
				layer.confirm('确认要删除吗？', {
					btn: ['确定', '取消'] //按钮
				}, function() {
					$.ajax({
						type: 'get',
						url: "{:url('sys/complain_del')}",
						dataType: 'json',
						data: {
							id: id
						},
						success: function(data) {
							if(data.code == 200) {
								$(obj).parents("tr").remove();
								layer.msg(data.msg, {
									icon: 1,
									time: 1000
								});
							} else {
								layer.msg(data.msg, {
									icon: 1,
									time: 1000
								});
							}
						},
						error: function(data) {
							console.log(data.msg);
						}
					});
				});
			}

		</script>